import React, { Component} from 'react';
import Split from '../CommonComponent/Split'
import {Link} from 'react-router';
import Top from '../CommonComponent/Top'
import Time from '../CommonComponent/Time'
import {MyInfo} from '../../Action/auth';

export default class MyPoints extends Component {
    // 构造
    constructor(props) {
        super(props);
        // 初始状态
        this.state = {
            nowPoints:''
        };
    }

    componentWillMount() {
        this.getMyInfo()
    }

    async getMyInfo(){
        await MyInfo()
            .then(res=>{
                this.setState({nowPoints:res.NOW_POINTS})
            })
    }

    render(){
        return(
            <div>
                <Top
                    title ={'我的积分'}
                />
                <div className="containerNav" style={{top:50}}>

                    <div className="pay_padd border_bottom">
                        <div className="f14">
                            <span>维魅力</span><span className="color9">-当前积分</span>
                        </div>
                        <div className="flex flex-pack-justify" style={{alignItems:'flex-end',marginTop:15}}>
                            <div className="colorlv">
                                <span className="f14">￥</span>
                                <span className="borderno f18">{this.state.nowPoints}</span>
                            </div>
                        </div>
                    </div>
                    {/*<div className="flex flex-align-center border_bottom pAll">
                        <Time />
                        <button className="bgk_lv colorfff borderno btn_pa border_4 f18 ml">确定</button>
                    </div>*/}


                    {/*<Split />
                    <div className="pAll">
                        <div className="f14" style={{paddingBottom:0}}>积分使用记录</div>
                        <div className="flex flex-align-center flex-pack-justify border_bottom padd8 f14">
                            <span className="color9">购物</span>
                            <div className="mt5"><span>-2000</span></div>
                        </div>
                        <div className="flex flex-align-center flex-pack-justify border_bottom padd8 f14">
                            <span className="color9">分销奖励</span>
                            <div className="mt5"><span>+2000</span></div>
                        </div>
                    </div>*/}


                    {/*<div className="flex flex-align-center border_bottom" style={{height:40,justifyContent:'flex-end'}}>
                        <div className="pr"><span>总计:</span>￥2000</div>
                    </div>*/}
                </div>
            </div>
        )
    }

}